import api from '../config/api'

import { globalData } from '../config/globalData'
import Ajax from '../utils/ajax'
import baseUrl from '../baseUrl'

export default class Address {
  /**
   * 获取用户默认地址
   */
  static async getDefaultAddress (param) {
    let url = baseUrl.server + api.GET_DEFAULT_ADDRESS
    let res = await Ajax.get(url, Object.assign({}, param, { token: globalData.access_token || '' }))
    return res
  }
}
